<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sb" uri="/struts-bootstrap-tags"%>
<s:include value="/WEB-INF/content/common/header.jsp" />

<style type="text/css">
.div-table-col {
	width: 100px;
}

.table th,.table td {
	text-align: center;
}

#tableData {
	overflow-y: scroll;
	height: 200px;
	/*     position:absolute; */
}
</style>
<title><s:text name="global.application.title" /> - <s:text name="global.title.selectclient" /></title>
</head>
<body>
	<div class="container-fluid">
		<div class="row-fluid">
			<s:include value="/WEB-INF/content/common/title-head.jsp" />
		</div>
		<div class="row-fluid">
			<div class="container-fluid">
				<div class="well">
				<p align="center"  style="font-size: 22px;">
					<s:text name="SelectClient.UserSelection" />
				</p>
				
					<s:form action="searchClient" namespace="/selectClient"
						theme="bootstrap" cssClass="form-horizontal form-small"
						label="">
						<s:actionerror theme="bootstrap" />
						<s:textfield name="searchClient.userName"
							placeholder="%{getText('SelectClient.searchall')}"
							label="%{getText('SelectClient.Name')}" />
						<s:textfield name="searchClient.residance"
							placeholder="%{getText('SelectClient.searchall')}"
							label="%{getText('SelectClient.Address')}" />
						<s:textfield name="searchClient.hcsID"
							placeholder="%{getText('SelectClient.searchall')}"
							label="%{getText('SelectClient.HCSID')}" />
						<fieldset>
							<div class="control-group">
								<div class="controls">
									<s:submit value="%{getText('SelectClient.Search')}"
										cssClass="btn btn-primary" />
								</div>
							</div>
						</fieldset>
					</s:form>
				
				</div>
				<%-- <div class="well well-large">
					<s:form action="searchClient" namespace="/selectClient"
						theme="bootstrap" label="%{getText('SelectClient.UserSelection')}">

						<div class="div-table">

							<div class="div-table-row">
								<s:actionerror theme="bootstrap" />
							</div>

							<div class="div-table-row">
								<div class="div-table-col" align="center">
									<s:text name="SelectClient.Name" />
								</div>
								<div class="div-table-col">
									<s:textfield name="searchClient.userName"
										placeholder="%{getText('SelectClient.searchall')}"
										style="width: 350px;" />
								</div>
							</div>

							<div class="div-table-row">
								<div class="div-table-col" align="center">
									<s:text name="SelectClient.Address" />
								</div>
								<div class="div-table-col">
									<s:textfield name="searchClient.residance"
										placeholder="%{getText('SelectClient.searchall')}"
										style="width: 350px;" />
								</div>
							</div>

							<div class="div-table-row">
								<div class="div-table-col" align="center">
									<s:text name="SelectClient.HCSID" />
								</div>
								<div class="div-table-col">
									<s:textfield name="searchClient.hcsID"
										placeholder="%{getText('SelectClient.searchall')}"
										style="width: 350px;" />
								</div>
								<div class="div-table-col"></div>
								<div class="div-table-col"></div>
								<div class="div-table-col"></div>
							</div>

							<div class="div-table-row">
								<div class="div-table-col pull-right">
									<s:submit value="%{getText('SelectClient.Search')}"
										cssClass="btn btn-primary" />
								</div>
							</div>

						</div>

					</s:form>
				</div> --%>
			</div>
		</div>

		<div class="row-fluid">
			<div class="well">

				<table class="table table-striped">
					<thead>
						<tr>
							<th><s:text name="#" /></th>
							<th class="nowrap"><s:text name="SelectClient.ViewMenu" /></th>
							<th class="nowrap"><s:text name="SelectClient.WeekData" /></th>
							<th class="nowrap"><s:text name="SelectClient.ClientName" /></th>
							<th class="nowrap"><s:text name="SelectClient.Address" /></th>
							<th class="nowrap"><s:text name="SelectClient.ClientID" /></th>
						</tr>
					</thead>

					<tbody id="tableData">

						<s:iterator value="selectClientList" status="rowIndex">
							<tr>
								<td><s:property value="uid" /></td>
								
								<td>
									<s:url action="view" namespace="/menuItems"	var="menuUrl">
										<s:param name="patientClientUID" value="clientID"/>
									</s:url> 
									<s:a href="%{#menuUrl}">
										<img src="../theme/img/menu.png" class="img-rounded btn">
									</s:a>
								</td>
								
								<td>
									<s:url action="view" namespace="/weekData"	var="weekUrl">
										<s:param name="patientClientUID" value="clientID"/>
									</s:url>
									<s:a href="%{#weekUrl}">
										<img src="../theme/img/weekdata.png" class="img-rounded btn">
									</s:a>
								</td>
								
								<td><s:property value="userName" /></td>
								<td><s:property value="residance" /></td>
								<td nowrap><s:property value="hcsID" /></td>
							</tr>
						</s:iterator>
					</tbody>

				</table>
			</div>
		</div>
	</div>

	<s:include value="/WEB-INF/content/common/footer.jsp" />